package myHomework;

import javax.naming.Name;
import java.util.ArrayList;
import java.util.Scanner;

public class Work3 {
    public static void main(String[] args) {
        //用于主流程
        Scanner scanner = new Scanner(System.in);
        lobel:while (true)
        {
            int i = Integer.parseInt(scanner.nextLine());
            switch (i)
            {
                case 1:studentList();break;
                case 2:addStudent();break;
                case 3:delStudent();break;
                case 4:reviseStudent();break;
                case 5:demandStudent();break;
                case 6:boolean j=exitSystem();
                    if(j){
                        break lobel;
                    }else {
                        break;
                    }
                default:
                    System.out.println("input false,please re-enter");
            }
        }

    }

    //学生列表
    public static void studentList()
    {


    }

    //增加学生
    public static void addStudent()
    {

    }
    //删除学生
    public static void delStudent()
    {

    }
    //修改学生
    public static void reviseStudent()
    {

    }
    //查询学生
    public static void demandStudent()
    {

    }
    //退出系统
    public static boolean exitSystem()
    {
        System.out.println("Confirm to exit?  true please 1  false  please 2");
        Scanner scanner = new Scanner(System.in);
        int i = Integer.parseInt(scanner.nextLine());
        if(i==1){
            //结束循环
            return true;
        }else{
            //继续执行循环
            return false;
        }
    }
}
